<template name="header">
  <nav class="header" role="navigation">
    <div class="header-title">
      <a href="{{pathFor 'index'}}" id="a-title">CMeteor</a>
    </div>
    <div class="header-collapse" id="bs-navbar-collapse">
      {{#if currentUser}}
      <ul class="header-ul">
        <li>
          <a href="{{pathFor 'postSubmit'}}">发布</a>
        </li>
        <li>
          <a href="{{pathFor 'notify'}}">消息:  <i id="i-notify-count" class="badge">{{notifyCount}}</i></a>
        </li>
        <li id="li-username">
          <a href="{{pathFor 'userhome'}}">{{currentUser.username}}</a>
        </li>
        <li>
          <a id="a-logout" href="#">退出</a>
        </li>
      </ul>
      {{else}}
      <ul class="nav navbar-nav navbar-right">
        <li>
          <a href="{{pathFor 'signup'}}">注册</a>
        </li>
        <li>
          <a href="{{pathFor 'login'}}">登录</a>
        </li>
      </ul>
      {{/if}}
    </div>
  </nav>
</template>
